package semantic.rules.walk

import lexis.CLexemeType._
import utils.data.CTree
import scala.collection.mutable.Buffer
import semantic.COperations._
import syntax.CASTNode
import syntax.CTerminal
import syntax.CGrammar._

object CWalkRuleTrueFalse extends CWalkRule
{
    override val categories:Seq[CTerminal] = LexemeType2Terminal(TRUE) :: LexemeType2Terminal(FALSE) :: Nil

    override def post(node:CASTNode)(implicit tree:CTree[CASTNode], code:Buffer[String]) = code += s"$PUSH ${node.value}"
}
